More syntactic sugar.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 14 Sep 2005 19:34:13 +0000 (19:34 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 14 Sep 2005 19:34:13 +0000 (19:34 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xend/xenstore/xstransact.py

index 7cabc251275d36fa7d27e5359c068a9f66b336bd..94a9bda1bd1313cc84dafe5a0d74d85cceed2a6b 100644 (file)
@@ -105,6 +105,8 @@ class xstransact:
         return ret
 
     def gather(self, *args):
+        if len(args) and type(args[0]) != tuple:
+            args = args,
         ret = []
         for tup in args:
             if len(tup) == 2:
@@ -122,6 +124,8 @@ class xstransact:
         return ret
 
     def store(self, *args):
+        if len(args) and type(args[0]) != tuple:
+            args = args,
         for tup in args:
             if len(tup) == 2:
                 (key, val) = tup